package com.example.dong.clients.configuration;

import feign.RequestInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.core.annotation.Order;

/**
 * @author dzh
 * @date 2022/12/27 16:41
 */
public class SomethingClientConfig {

    @Bean
    @Order(1000)
    public RequestInterceptor getRequestInterceptor() {
        return template -> {
            // 修改头信息
            template.header("Authorization", "okk==");

            // 修改路径
            String path = template.path();
            template.uri(path);
        };
    }
}
